<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
	<script type="text/javascript" src="./ajax.js"></script>
	<script type="text/javascript">
	
		ajax({
			method:"post",
			url: "http://wish.byesame.com/login",
			params:{
				userName:"admin",
				passWord: "123456"
			},
			ContentType:"application/x-www-form-urlencoded",
			success:function(res){
				console.log(res)
				localStorage.setItem("token",res.data.token)
				list()
			}
		})

		function list(){
			ajax({
				method:"get",
				url: "http://wish.byesame.com/admin",
				params:{
					page:1,
					rows:10
				},
				token:localStorage.getItem("token"),
				success: function(res){
					console.log(res)
					search()
				}
			})
		} 
		function search(){
			console.log(111111111111111)
			ajax({
				method:"getOther",
				url: "http://wish.byesame.com/admin",
				params:{
					id:44445
				},
				token: localStorage.getItem("token"),
				success: function(res){
					console.log(res)
				}
			})
		}
	</script> 
</body>
</html>